import { FC, useState } from "react";
import { Dialog } from "react-vant";
import qrcode_wx from "../../assets/images/qrcode_wx.jpg";
import {Image} from "antd-mobile";

interface IProps {
    title: string;  // 弹窗标题
    visible: boolean; // 是否显示弹窗
    onClose?: () => void; // 关闭弹窗
}

const QrcodeDialog:FC<IProps> = (props) => {
    const [visible, setVisible] = useState(false);
    return (
        <Dialog
            visible={props.visible}
            title={props.title}
            showCancelButton={true}
            showConfirmButton={false}
            cancelButtonText="关闭"
            onCancel={props.onClose}
        >
            <Image fit="cover" src={qrcode_wx} alt="" />
        </Dialog>
    )
}

export default QrcodeDialog;